// $URL: http://mingw-lib.googlecode.com/svn/trunk/working/avcodec_to_widget_9/t_httpbackend.h $
// $Rev: 299 $
// $Author: akio.miyoshi $
// $Date:: 2010-07-28 15:48:06 +0000#$

#ifndef T_MY_HTTPBACKEND_P_H
#define T_MY_HTTPBACKEND_P_H

#include "nam.h"

class T_MyBackendFactory : public NetworkAccessBackendFactory
{
    Q_OBJECT
public:
    T_MyBackendFactory(QObject * parent = 0) : NetworkAccessBackendFactory(parent)
    {
    }
    virtual QObject *create(QNetworkAccessManager * manager,
                            QNetworkAccessManager::Operation op,
                            const QNetworkRequest & request,
                            QIODevice * outgoingData) const;
};

class T_HttpAccessBackend : public HttpAccessBackend
{
    Q_OBJECT
public:
    explicit T_HttpAccessBackend(QNetworkAccessManager * manager)
        : HttpAccessBackend(manager)
    {  }
    virtual ~T_HttpAccessBackend()
    {  }
    virtual class NetworkHttpReply *createHttpReply();
};

class T_NetworkAccessManager : public NetworkAccessManager
{
    Q_OBJECT
public:
    T_NetworkAccessManager(QObject *parent = 0)
        : NetworkAccessManager(parent)
    {
        this->setBackendFactory(new T_MyBackendFactory(this));
    }
};

#endif
